Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No mix -> dont mix morning and evening theory etc
Same building -> same building
Closer -> closer classes
This pull request introduces significant improvements to how timetable data is filtered and displayed, focusing on enhancing the user experience by adding "smart" filtering options and supporting classroom venue information throughout the timetable selection and display process. The changes also ensure that venue data is consistently propagated and visible in the UI.
Key changes include:
Smart Filtering and Pagination Enhancements
Added new "smart filter" options in
ViewTimeTable.tsxto allow users to filter timetables by criteria such as all classes being in the same building, classrooms being close together, or avoiding mixes of morning and evening slots. These filters use both venue and slot geometry data for more relevant results. The UI now provides buttons for these filters, updates pagination to reflect filtered results, and disables navigation buttons appropriately. [1] [2] [3] [4] [5]Pagination logic has been updated so that when a smart filter is active, only the matching timetables are shown and navigated through, ensuring a more intuitive experience. [1] [2]
Venue Data Propagation
venueinformation for each faculty/slot assignment, ensuring that classroom locations are available for filtering and display. This includes updates in both the timetable generation logic and the display components. [1] [2] [3] [4] [5] [6] [7]UI and Usability Improvements
The
CompoundTablecomponent and its data types now support displaying venue information, allowing users to see classroom locations directly in the timetable view. [1] [2]Action buttons and navigation controls are now conditionally rendered/enabled based on the presence of timetable data, preventing user errors and improving clarity. [1] [2]
Code Quality and Maintainability
Refactored slot and venue extraction logic for clarity and maintainability, including helper functions for slot analysis and venue proximity checks.
Added missing import for
getSlotutility to support slot geometry calculations.